package BIOtest06;

import java.io.IOException;
import java.io.PrintStream;
import java.net.Socket;
import java.util.Scanner;

public class Client  {
    public static void main(String[] args) {
        try {
            Socket socket = new Socket("127.0.0.1",9000);
            PrintStream printStream = new PrintStream(socket.getOutputStream());
            new ClientSocketThread(socket).start();
            Scanner input = new Scanner(System.in);
            while(true){
                System.out.print("请输入：");
                String msg = input.nextLine();
                printStream.println(msg);
                printStream.flush();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
